package com.lap.auth.application.dict.command;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

@Data
@Schema(description = "创建字典命令")
public class CreateDictCmd {

  @NotNull(message = "{dict.value.required}")
  @Range(min = 0, max = 64, message = "{dict.value.range}")
  @Schema(description = "明细值")
  private Integer value;

  @NotBlank(message = "{dict.label.required}")
  @Length(max = 32, message = "{dict.label.max.length}")
  @Schema(description = "明细标题")
  private String label;

  @NotNull(message = "{dict.status.required}")
  @Range(min = -127, max = 128, message = "{dict.status.range}")
  @Schema(description = "状态:0-禁用,1-正常")
  private Integer status;

  @NotBlank(message = "{dict.local.required}")
  @Length(max = 8, message = "{dict.local.max.length}")
  @Schema(description = "语言")
  private String local;

  @NotNull(message = "{dict.sortOrder.required}")
  @Range(min = -127, max = 128, message = "{dict.sortOrder.range}")
  @Schema(description = "排序")
  private Integer sortOrder;
}
